package cm.jiyun.controller;

import cm.jiyun.pojo.Employee;
import cm.jiyun.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("tigongzhe")
public class EmployeeController {
    @Autowired
    private EmployeeService employeeService;

    @RequestMapping("getAll")
    @ResponseBody
    public Employee getAll() throws InterruptedException {
        Thread.sleep(2000L);
        return employeeService.getAll();
    }
}
